<div class="BlogBlockType2">
  <div class="BlogTitle">
    <a href="{{config.url_blog}}/{{ blog.key.id }}/"><h3>{{ blog.title|escape }}</h3></a>
  </div>

  <div class="BlogTime">
  {{ blog.author }} {{ lang.blog_time }} {{ blog.date.date }} {{ blog.date|time:"H:i" }}
  </div>
  
  {% if ytblog_use_promotion %}
  <div class="BlogPromote">
  {{ lang.blog_popular }}: {{ blog.points }}
  </div>
  {% endif %}
  
  <div class="BlogText">
  {% if blogs %}  
  {{ blog.content|removetags:"script"|truncatewords_html:config.blog_words }}
  {% else %}
  {{ blog.content|removetags:"script" }}
  {% endif %}
  </div>
  
  <div class="BlogOperation">

  {% if blog.auth.edit %}
  <a class="BlogOperation" href="{{config.url_blog}}/edit/{{ blog.key.id }}/">{{ lang.edit }}</a>
  {% endif %}

  {% if blog.auth.delete %}
  <a class="BlogOperation" 
  {% if blogs %}
    onclick="$.post('{{config.url_blog}}/delete/{{ blog.key.id }}/', function(data){document.location.reload();});" 
  {% else %}
    onclick="$.post('{{config.url_blog}}/delete/{{ blog.key.id }}/', function(data){document.location.replace('{{config.url_blog}}/');});"
  {% endif %}
    href="#">{{ lang.delete }}</a>
  {% endif %}
  
  {% if blog.auth.promote and ytblog_use_promotion %}
  <a class="BlogOperation" 
    onclick="$.post('{{config.url_blog}}/promote/{{ blog.key.id }}/', function(data){document.location.reload();});" 
    href="#">{{ lang.promote }}</a>
  {% endif %}

  </div>
  
  <div class="BlogBottom">
  </div>
</div>
